<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::SampleConsensus&lt; T &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_sample_consensus.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="classpcl_1_1_sample_consensus-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::SampleConsensus&lt; T &gt; 模板类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classpcl_1_1_sample_consensus.html" title="SampleConsensus represents the base class. All sample consensus methods must inherit from this class.">SampleConsensus</a> represents the base class. All sample consensus methods must inherit from this class.  
 <a href="classpcl_1_1_sample_consensus.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="sample__consensus_2include_2pcl_2sample__consensus_2sac_8h_source.html">sac.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:aaf12b77bbf0507ff0c7e28e4844d894f"><td class="memItemLeft" align="right" valign="top"><a id="aaf12b77bbf0507ff0c7e28e4844d894f"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:aaf12b77bbf0507ff0c7e28e4844d894f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd144d2c057d7b997877d5cce90c5a5"><td class="memItemLeft" align="right" valign="top"><a id="abfd144d2c057d7b997877d5cce90c5a5"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:abfd144d2c057d7b997877d5cce90c5a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:aee8d85e0b1062f5e18d43609e6ac59bf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, bool random=false)</td></tr>
<tr class="memdesc:aee8d85e0b1062f5e18d43609e6ac59bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">更多...</a><br /></td></tr>
<tr class="separator:aee8d85e0b1062f5e18d43609e6ac59bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4937e9bc2a8acf15ae97c7d763090a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, double threshold, bool random=false)</td></tr>
<tr class="memdesc:aac4937e9bc2a8acf15ae97c7d763090a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">更多...</a><br /></td></tr>
<tr class="separator:aac4937e9bc2a8acf15ae97c7d763090a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca6f09bf3c664bfed2ae36e81909e9f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">setSampleConsensusModel</a> (const SampleConsensusModelPtr &amp;model)</td></tr>
<tr class="memdesc:aca6f09bf3c664bfed2ae36e81909e9f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Sample Consensus model to use.  <a href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">更多...</a><br /></td></tr>
<tr class="separator:aca6f09bf3c664bfed2ae36e81909e9f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a101dfdcc9098f463db135a7655a438"><td class="memItemLeft" align="right" valign="top"><a id="a1a101dfdcc9098f463db135a7655a438"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a1a101dfdcc9098f463db135a7655a438">getSampleConsensusModel</a> () const</td></tr>
<tr class="memdesc:a1a101dfdcc9098f463db135a7655a438"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the Sample Consensus model used. <br /></td></tr>
<tr class="separator:a1a101dfdcc9098f463db135a7655a438"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a138ae225b2d724491a7abdfcfd2b4de5"><td class="memItemLeft" align="right" valign="top"><a id="a138ae225b2d724491a7abdfcfd2b4de5"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a138ae225b2d724491a7abdfcfd2b4de5">~SampleConsensus</a> ()</td></tr>
<tr class="memdesc:a138ae225b2d724491a7abdfcfd2b4de5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for base SAC. <br /></td></tr>
<tr class="separator:a138ae225b2d724491a7abdfcfd2b4de5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a06ccc992dfc9e65e70f5876f3c8d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">setDistanceThreshold</a> (double threshold)</td></tr>
<tr class="memdesc:ae1a06ccc992dfc9e65e70f5876f3c8d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the distance to model threshold.  <a href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">更多...</a><br /></td></tr>
<tr class="separator:ae1a06ccc992dfc9e65e70f5876f3c8d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a575ab4a3facfdc8e007f427a96798d7d"><td class="memItemLeft" align="right" valign="top"><a id="a575ab4a3facfdc8e007f427a96798d7d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a575ab4a3facfdc8e007f427a96798d7d">getDistanceThreshold</a> ()</td></tr>
<tr class="memdesc:a575ab4a3facfdc8e007f427a96798d7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the distance to model threshold, as set by the user. <br /></td></tr>
<tr class="separator:a575ab4a3facfdc8e007f427a96798d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8558bc2462b6da4a2f88b2efc1ad571"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">setMaxIterations</a> (int max_iterations)</td></tr>
<tr class="memdesc:af8558bc2462b6da4a2f88b2efc1ad571"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the maximum number of iterations.  <a href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">更多...</a><br /></td></tr>
<tr class="separator:af8558bc2462b6da4a2f88b2efc1ad571"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c7f23a52dc184d8cc56790d63d375a"><td class="memItemLeft" align="right" valign="top"><a id="aa5c7f23a52dc184d8cc56790d63d375a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa5c7f23a52dc184d8cc56790d63d375a">getMaxIterations</a> ()</td></tr>
<tr class="memdesc:aa5c7f23a52dc184d8cc56790d63d375a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum number of iterations, as set by the user. <br /></td></tr>
<tr class="separator:aa5c7f23a52dc184d8cc56790d63d375a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd6b8031622746d8b6aada91ffbaa7ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">setProbability</a> (double probability)</td></tr>
<tr class="memdesc:acd6b8031622746d8b6aada91ffbaa7ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the desired probability of choosing at least one sample free from outliers.  <a href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">更多...</a><br /></td></tr>
<tr class="separator:acd6b8031622746d8b6aada91ffbaa7ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afafb66faf0cbfa464cd884127bafdac3"><td class="memItemLeft" align="right" valign="top"><a id="afafb66faf0cbfa464cd884127bafdac3"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#afafb66faf0cbfa464cd884127bafdac3">getProbability</a> ()</td></tr>
<tr class="memdesc:afafb66faf0cbfa464cd884127bafdac3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain the probability of choosing at least one sample free from outliers, as set by the user. <br /></td></tr>
<tr class="separator:afafb66faf0cbfa464cd884127bafdac3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6bb9db27c2f0226aaa1e0c2af2b3439e"><td class="memItemLeft" align="right" valign="top"><a id="a6bb9db27c2f0226aaa1e0c2af2b3439e"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a6bb9db27c2f0226aaa1e0c2af2b3439e">computeModel</a> (int debug_verbosity_level=0)=0</td></tr>
<tr class="memdesc:a6bb9db27c2f0226aaa1e0c2af2b3439e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the actual model. Pure virtual. <br /></td></tr>
<tr class="separator:a6bb9db27c2f0226aaa1e0c2af2b3439e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7c059e9ee5b5180bb7fb02b0d947c36"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">refineModel</a> (const double sigma=3.0, const unsigned int max_iterations=1000)</td></tr>
<tr class="memdesc:af7c059e9ee5b5180bb7fb02b0d947c36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refine the model found. This loops over the model coefficients and optimizes them together with the set of inliers, until the change in the set of inliers is minimal.  <a href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">更多...</a><br /></td></tr>
<tr class="separator:af7c059e9ee5b5180bb7fb02b0d947c36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b0649ebe9cd4b8a48442f864f5e83c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">getRandomSamples</a> (const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, size_t nr_samples, std::set&lt; int &gt; &amp;indices_subset)</td></tr>
<tr class="memdesc:a56b0649ebe9cd4b8a48442f864f5e83c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of randomly selected indices.  <a href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">更多...</a><br /></td></tr>
<tr class="separator:a56b0649ebe9cd4b8a48442f864f5e83c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae09f01cda7605910955b0aee847ea849"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">getModel</a> (std::vector&lt; int &gt; &amp;model)</td></tr>
<tr class="memdesc:ae09f01cda7605910955b0aee847ea849"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">更多...</a><br /></td></tr>
<tr class="separator:ae09f01cda7605910955b0aee847ea849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ac2013afb3a2feaaeb661f3aa3ccf6b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">getInliers</a> (std::vector&lt; int &gt; &amp;inliers)</td></tr>
<tr class="memdesc:a7ac2013afb3a2feaaeb661f3aa3ccf6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best set of inliers found so far for this model.  <a href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">更多...</a><br /></td></tr>
<tr class="separator:a7ac2013afb3a2feaaeb661f3aa3ccf6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f55f89ee72539f66f7edc8bcf6ce0c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">getModelCoefficients</a> (Eigen::VectorXf &amp;model_coefficients)</td></tr>
<tr class="memdesc:a9f55f89ee72539f66f7edc8bcf6ce0c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the model coefficients of the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">更多...</a><br /></td></tr>
<tr class="separator:a9f55f89ee72539f66f7edc8bcf6ce0c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a7a731d68a379a0a6442deae93e85d3a8"><td class="memItemLeft" align="right" valign="top"><a id="a7a731d68a379a0a6442deae93e85d3a8"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7a731d68a379a0a6442deae93e85d3a8">rnd</a> ()</td></tr>
<tr class="memdesc:a7a731d68a379a0a6442deae93e85d3a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator. <br /></td></tr>
<tr class="separator:a7a731d68a379a0a6442deae93e85d3a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:aa4953d080c1ab4223cde8ff8d8cabc52"><td class="memItemLeft" align="right" valign="top"><a id="aa4953d080c1ab4223cde8ff8d8cabc52"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a></td></tr>
<tr class="memdesc:aa4953d080c1ab4223cde8ff8d8cabc52"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying data model used (i.e. what is it that we attempt to search for). <br /></td></tr>
<tr class="separator:aa4953d080c1ab4223cde8ff8d8cabc52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e04da16522ae180cb8cc2e6ef0d2244"><td class="memItemLeft" align="right" valign="top"><a id="a0e04da16522ae180cb8cc2e6ef0d2244"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a></td></tr>
<tr class="memdesc:a0e04da16522ae180cb8cc2e6ef0d2244"><td class="mdescLeft">&#160;</td><td class="mdescRight">The model found after the last computeModel () as point cloud indices. <br /></td></tr>
<tr class="separator:a0e04da16522ae180cb8cc2e6ef0d2244"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0115926eadf78f7bc1ad4675659d8343"><td class="memItemLeft" align="right" valign="top"><a id="a0115926eadf78f7bc1ad4675659d8343"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a></td></tr>
<tr class="memdesc:a0115926eadf78f7bc1ad4675659d8343"><td class="mdescLeft">&#160;</td><td class="mdescRight">The indices of the points that were chosen as inliers after the last computeModel () call. <br /></td></tr>
<tr class="separator:a0115926eadf78f7bc1ad4675659d8343"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96f852dfca500689684313d3cb7f84b1"><td class="memItemLeft" align="right" valign="top"><a id="a96f852dfca500689684313d3cb7f84b1"></a>
Eigen::VectorXf&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a></td></tr>
<tr class="memdesc:a96f852dfca500689684313d3cb7f84b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The coefficients of our model computed directly from the model found. <br /></td></tr>
<tr class="separator:a96f852dfca500689684313d3cb7f84b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a025913cc2a2099a553fe7842aa792326"><td class="memItemLeft" align="right" valign="top"><a id="a025913cc2a2099a553fe7842aa792326"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a></td></tr>
<tr class="memdesc:a025913cc2a2099a553fe7842aa792326"><td class="mdescLeft">&#160;</td><td class="mdescRight">Desired probability of choosing at least one sample free from outliers. <br /></td></tr>
<tr class="separator:a025913cc2a2099a553fe7842aa792326"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471e062f42e9cb4ae9d77107cc135acb"><td class="memItemLeft" align="right" valign="top"><a id="a471e062f42e9cb4ae9d77107cc135acb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a></td></tr>
<tr class="memdesc:a471e062f42e9cb4ae9d77107cc135acb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of internal loop iterations that we've done so far. <br /></td></tr>
<tr class="separator:a471e062f42e9cb4ae9d77107cc135acb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1c52d7d8be8f058feac1f9241bf305e"><td class="memItemLeft" align="right" valign="top"><a id="aa1c52d7d8be8f058feac1f9241bf305e"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a></td></tr>
<tr class="memdesc:aa1c52d7d8be8f058feac1f9241bf305e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distance to model threshold. <br /></td></tr>
<tr class="separator:aa1c52d7d8be8f058feac1f9241bf305e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><td class="memItemLeft" align="right" valign="top"><a id="ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a></td></tr>
<tr class="memdesc:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of iterations before giving up. <br /></td></tr>
<tr class="separator:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3860965324830148970ba99223663aa2"><td class="memItemLeft" align="right" valign="top"><a id="a3860965324830148970ba99223663aa2"></a>
boost::mt19937&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a></td></tr>
<tr class="memdesc:a3860965324830148970ba99223663aa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator algorithm. <br /></td></tr>
<tr class="separator:a3860965324830148970ba99223663aa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23f804b4957312659adca2068e05682"><td class="memItemLeft" align="right" valign="top"><a id="aa23f804b4957312659adca2068e05682"></a>
boost::shared_ptr&lt; boost::uniform_01&lt; boost::mt19937 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a></td></tr>
<tr class="memdesc:aa23f804b4957312659adca2068e05682"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator distribution. <br /></td></tr>
<tr class="separator:aa23f804b4957312659adca2068e05682"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a60a210f3e26552ad8f8e6e84f0d345ca"><td class="memItemLeft" align="right" valign="top"><a id="a60a210f3e26552ad8f8e6e84f0d345ca"></a>
typedef <a class="el" href="classpcl_1_1_sample_consensus_model.html">SampleConsensusModel</a>&lt; T &gt;::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>SampleConsensusModelPtr</b></td></tr>
<tr class="separator:a60a210f3e26552ad8f8e6e84f0d345ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:ad113bbc7fe758479a315bc5108324336"><td class="memItemLeft" align="right" valign="top"><a id="ad113bbc7fe758479a315bc5108324336"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ad113bbc7fe758479a315bc5108324336">SampleConsensus</a> ()</td></tr>
<tr class="memdesc:ad113bbc7fe758479a315bc5108324336"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC. <br /></td></tr>
<tr class="separator:ad113bbc7fe758479a315bc5108324336"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class pcl::SampleConsensus&lt; T &gt;</h3>

<p><a class="el" href="classpcl_1_1_sample_consensus.html" title="SampleConsensus represents the base class. All sample consensus methods must inherit from this class.">SampleConsensus</a> represents the base class. All sample consensus methods must inherit from this class. </p>
<dl class="section author"><dt>作者</dt><dd>Radu Bogdan Rusu </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="aee8d85e0b1062f5e18d43609e6ac59bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee8d85e0b1062f5e18d43609e6ac59bf">&#9670;&nbsp;</a></span>SampleConsensus() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::<a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>random</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor for base SAC. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">random</td><td>if true set the random seed to the current time, else set to 12345 (default: false) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        : <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a> (model)</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a> ()</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a> ()</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a> ()</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a> (0.99)</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> (0)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> (std::numeric_limits&lt;double&gt;::max ())</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> (1000)</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a> ()</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a> (<span class="keyword">new</span> boost::uniform_01&lt;boost::mt19937&gt; (<a class="code" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a>))</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;         <span class="comment">// Create a random number generator object</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;         <span class="keywordflow">if</span> (random)</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;           <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a>-&gt;base ().seed (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span><span class="keyword">&gt;</span> (std::time (0)));</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;         <span class="keywordflow">else</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;           <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a>-&gt;base ().seed (12345u);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;      };</div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0115926eadf78f7bc1ad4675659d8343"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">pcl::SampleConsensus::inliers_</a></div><div class="ttdeci">std::vector&lt; int &gt; inliers_</div><div class="ttdoc">The indices of the points that were chosen as inliers after the last computeModel () call.</div><div class="ttdef"><b>Definition:</b> sac.h:316</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a025913cc2a2099a553fe7842aa792326"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">pcl::SampleConsensus::probability_</a></div><div class="ttdeci">double probability_</div><div class="ttdoc">Desired probability of choosing at least one sample free from outliers.</div><div class="ttdef"><b>Definition:</b> sac.h:322</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0e04da16522ae180cb8cc2e6ef0d2244"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">pcl::SampleConsensus::model_</a></div><div class="ttdeci">std::vector&lt; int &gt; model_</div><div class="ttdoc">The model found after the last computeModel () as point cloud indices.</div><div class="ttdef"><b>Definition:</b> sac.h:313</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a3860965324830148970ba99223663aa2"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">pcl::SampleConsensus::rng_alg_</a></div><div class="ttdeci">boost::mt19937 rng_alg_</div><div class="ttdoc">Boost-based random number generator algorithm.</div><div class="ttdef"><b>Definition:</b> sac.h:334</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a471e062f42e9cb4ae9d77107cc135acb"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">pcl::SampleConsensus::iterations_</a></div><div class="ttdeci">int iterations_</div><div class="ttdoc">Total number of internal loop iterations that we've done so far.</div><div class="ttdef"><b>Definition:</b> sac.h:325</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a96f852dfca500689684313d3cb7f84b1"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">pcl::SampleConsensus::model_coefficients_</a></div><div class="ttdeci">Eigen::VectorXf model_coefficients_</div><div class="ttdoc">The coefficients of our model computed directly from the model found.</div><div class="ttdef"><b>Definition:</b> sac.h:319</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa1c52d7d8be8f058feac1f9241bf305e"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">pcl::SampleConsensus::threshold_</a></div><div class="ttdeci">double threshold_</div><div class="ttdoc">Distance to model threshold.</div><div class="ttdef"><b>Definition:</b> sac.h:328</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa23f804b4957312659adca2068e05682"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">pcl::SampleConsensus::rng_</a></div><div class="ttdeci">boost::shared_ptr&lt; boost::uniform_01&lt; boost::mt19937 &gt; &gt; rng_</div><div class="ttdoc">Boost-based random number generator distribution.</div><div class="ttdef"><b>Definition:</b> sac.h:337</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa4953d080c1ab4223cde8ff8d8cabc52"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">pcl::SampleConsensus::sac_model_</a></div><div class="ttdeci">SampleConsensusModelPtr sac_model_</div><div class="ttdoc">The underlying data model used (i.e. what is it that we attempt to search for).</div><div class="ttdef"><b>Definition:</b> sac.h:310</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">pcl::SampleConsensus::max_iterations_</a></div><div class="ttdeci">int max_iterations_</div><div class="ttdoc">Maximum number of iterations before giving up.</div><div class="ttdef"><b>Definition:</b> sac.h:331</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aac4937e9bc2a8acf15ae97c7d763090a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac4937e9bc2a8acf15ae97c7d763090a">&#9670;&nbsp;</a></span>SampleConsensus() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::<a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>random</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructor for base SAC. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>distance to model threshol </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">random</td><td>if true set the random seed to the current time, else set to 12345 (default: false) </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        : <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a> (model)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a> ()</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a> ()</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a> ()</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a> (0.99)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> (0)</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> (threshold)</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> (1000)</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a> ()</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        , <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a> (<span class="keyword">new</span> boost::uniform_01&lt;boost::mt19937&gt; (<a class="code" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a>))</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      {</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;         <span class="comment">// Create a random number generator object</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;         <span class="keywordflow">if</span> (random)</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;           <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a>-&gt;base ().seed (<span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span><span class="keyword">&gt;</span> (std::time (0)));</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;         <span class="keywordflow">else</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;           <a class="code" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a>-&gt;base ().seed (12345u);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;      };</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a7ac2013afb3a2feaaeb661f3aa3ccf6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ac2013afb3a2feaaeb661f3aa3ccf6b">&#9670;&nbsp;</a></span>getInliers()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::getInliers </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>inliers</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the best set of inliers found so far for this model. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">inliers</td><td>the resultant set of inliers </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;{ inliers = <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae09f01cda7605910955b0aee847ea849"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae09f01cda7605910955b0aee847ea849">&#9670;&nbsp;</a></span>getModel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::getModel </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the best model found so far. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">model</td><td>the resultant model </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;{ model = <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9f55f89ee72539f66f7edc8bcf6ce0c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f55f89ee72539f66f7edc8bcf6ce0c2">&#9670;&nbsp;</a></span>getModelCoefficients()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::getModelCoefficients </td>
          <td>(</td>
          <td class="paramtype">Eigen::VectorXf &amp;&#160;</td>
          <td class="paramname"><em>model_coefficients</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the model coefficients of the best model found so far. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">model_coefficients</td><td>the resultant model coefficients, as documented in <a class="el" href="dir_c7755524a431c11f03a79f7e7a55c8ae.html">sample_consensus</a> </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;{ model_coefficients = <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a>; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a56b0649ebe9cd4b8a48442f864f5e83c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56b0649ebe9cd4b8a48442f864f5e83c">&#9670;&nbsp;</a></span>getRandomSamples()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::getRandomSamples </td>
          <td>(</td>
          <td class="paramtype">const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nr_samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::set&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices_subset</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a set of randomly selected indices. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>the input indices vector </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nr_samples</td><td>the desired number of point indices to randomly select </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">indices_subset</td><td>the resultant output set of randomly selected indices </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;      {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        indices_subset.clear ();</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <span class="keywordflow">while</span> (indices_subset.size () &lt; nr_samples)</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;          <span class="comment">//indices_subset.insert ((*indices)[(int) (indices-&gt;size () * (rand () / (RAND_MAX + 1.0)))]);</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;          indices_subset.insert ((*indices)[<span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (<span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(indices-&gt;size ()) * <a class="code" href="classpcl_1_1_sample_consensus.html#a7a731d68a379a0a6442deae93e85d3a8">rnd</a> ())]);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;      }</div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a7a731d68a379a0a6442deae93e85d3a8"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a7a731d68a379a0a6442deae93e85d3a8">pcl::SampleConsensus::rnd</a></div><div class="ttdeci">double rnd()</div><div class="ttdoc">Boost-based random number generator.</div><div class="ttdef"><b>Definition:</b> sac.h:341</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af7c059e9ee5b5180bb7fb02b0d947c36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7c059e9ee5b5180bb7fb02b0d947c36">&#9670;&nbsp;</a></span>refineModel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::refineModel </td>
          <td>(</td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>sigma</em> = <code>3.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned int&#160;</td>
          <td class="paramname"><em>max_iterations</em> = <code>1000</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Refine the model found. This loops over the model coefficients and optimizes them together with the set of inliers, until the change in the set of inliers is minimal. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sigma</td><td>standard deviation multiplier for considering a sample as inlier (Mahalanobis distance) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">max_iterations</td><td>the maxim number of iterations to try to refine in case the inliers keep on changing </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;      {</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>)</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;          PCL_ERROR (<span class="stringliteral">&quot;[pcl::SampleConsensus::refineModel] Critical error: NULL model!\n&quot;</span>);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;          <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        }</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordtype">double</span> inlier_distance_threshold_sqr = <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> * <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a>, </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;               error_threshold = <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a>;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="keywordtype">double</span> sigma_sqr = sigma * sigma;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> refine_iterations = 0;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keywordtype">bool</span> inlier_changed = <span class="keyword">false</span>, oscillating = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        std::vector&lt;int&gt; new_inliers, prev_inliers = <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        std::vector&lt;size_t&gt; inliers_sizes;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        Eigen::VectorXf new_model_coefficients = <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a>;</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordflow">do</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;          <span class="comment">// Optimize the model coefficients</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;          <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;optimizeModelCoefficients (prev_inliers, new_model_coefficients, new_model_coefficients);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;          inliers_sizes.push_back (prev_inliers.size ());</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160; </div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;          <span class="comment">// Select the new inliers based on the optimized coefficients and new threshold</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;          <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;selectWithinDistance (new_model_coefficients, error_threshold, new_inliers);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;          PCL_DEBUG (<span class="stringliteral">&quot;[pcl::SampleConsensus::refineModel] Number of inliers found (before/after): %lu/%lu, with an error threshold of %g.\n&quot;</span>, prev_inliers.size (), new_inliers.size (), error_threshold);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        </div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;          <span class="keywordflow">if</span> (new_inliers.empty ())</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;          {</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            refine_iterations++;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            <span class="keywordflow">if</span> (refine_iterations &gt;= max_iterations)</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;              <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            <span class="comment">//return (false);</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;          }</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;          <span class="comment">// Estimate the variance and the new threshold</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;          <span class="keywordtype">double</span> variance = <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;computeVariance ();</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;          error_threshold = sqrt (std::min (inlier_distance_threshold_sqr, sigma_sqr * variance));</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;          PCL_DEBUG (<span class="stringliteral">&quot;[pcl::SampleConsensus::refineModel] New estimated error threshold: %g on iteration %d out of %d.\n&quot;</span>, error_threshold, refine_iterations, max_iterations);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;          inlier_changed = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;          std::swap (prev_inliers, new_inliers);</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;          <span class="comment">// If the number of inliers changed, then we are still optimizing</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;          <span class="keywordflow">if</span> (new_inliers.size () != prev_inliers.size ())</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;          {</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="comment">// Check if the number of inliers is oscillating in between two values</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="keywordflow">if</span> (inliers_sizes.size () &gt;= 4)</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            {</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;              <span class="keywordflow">if</span> (inliers_sizes[inliers_sizes.size () - 1] == inliers_sizes[inliers_sizes.size () - 3] &amp;&amp;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                  inliers_sizes[inliers_sizes.size () - 2] == inliers_sizes[inliers_sizes.size () - 4])</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;              {</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                oscillating = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;              }</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            }</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;            inlier_changed = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;          }</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;          <span class="comment">// Check the values of the inlier set</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;          <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; prev_inliers.size (); ++i)</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;          {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="comment">// If the value of the inliers changed, then we are still optimizing</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <span class="keywordflow">if</span> (prev_inliers[i] != new_inliers[i])</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;              inlier_changed = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;              <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;            }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;          }</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        }</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordflow">while</span> (inlier_changed &amp;&amp; ++refine_iterations &lt; max_iterations);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;      </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="comment">// If the new set of inliers is empty, we didn&#39;t do a good job refining</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="keywordflow">if</span> (new_inliers.empty ())</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        {</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;          PCL_ERROR (<span class="stringliteral">&quot;[pcl::SampleConsensus::refineModel] Refinement failed: got an empty set of inliers!\n&quot;</span>);</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;          <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160; </div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordflow">if</span> (oscillating)</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        {</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;          PCL_DEBUG (<span class="stringliteral">&quot;[pcl::SampleConsensus::refineModel] Detected oscillations in the model refinement.\n&quot;</span>);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;          <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <span class="comment">// If no inliers have been changed anymore, then the refinement was successful</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordflow">if</span> (!inlier_changed)</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        {</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;          std::swap (<a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>, new_inliers);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;          <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a> = new_model_coefficients;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;          <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        }</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae1a06ccc992dfc9e65e70f5876f3c8d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a06ccc992dfc9e65e70f5876f3c8d3">&#9670;&nbsp;</a></span>setDistanceThreshold()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::setDistanceThreshold </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>threshold</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the distance to model threshold. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>distance to model threshold </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;{ <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> = threshold; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="af8558bc2462b6da4a2f88b2efc1ad571"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8558bc2462b6da4a2f88b2efc1ad571">&#9670;&nbsp;</a></span>setMaxIterations()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::setMaxIterations </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max_iterations</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the maximum number of iterations. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">max_iterations</td><td>maximum number of iterations </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;{ <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> = max_iterations; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="acd6b8031622746d8b6aada91ffbaa7ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd6b8031622746d8b6aada91ffbaa7ee">&#9670;&nbsp;</a></span>setProbability()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::setProbability </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>probability</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the desired probability of choosing at least one sample free from outliers. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">probability</td><td>the desired probability of choosing at least one sample free from outliers </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>internally, the probability is set to 99% (0.99) by default. </dd></dl>
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;{ <a class="code" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a> = probability; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="aca6f09bf3c664bfed2ae36e81909e9f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca6f09bf3c664bfed2ae36e81909e9f2">&#9670;&nbsp;</a></span>setSampleConsensusModel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus</a>&lt; T &gt;::setSampleConsensusModel </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the Sample Consensus model to use. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a> = model;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>sample_consensus/include/pcl/sample_consensus/<a class="el" href="sample__consensus_2include_2pcl_2sample__consensus_2sac_8h_source.html">sac.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
